package com.wm.wmim.connect.sdk.push.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author weiming
 * @date 2024/12/14 0:02
 * @description
 */
@AllArgsConstructor
@Getter
public enum WsPushResultEnum {

    /**
     * 全部成功
     */
    ALL_SUCCESS("AllSuccess"),

    /**
     * 全部失败
     */
    ALL_FAIL("AllFail"),

    /**
     * 部分成功
     */
    PART_SUCCESS("PartSuccess"),


    ;


    private String code;

    public static WsPushResultEnum getByCode(String code) {
        for (WsPushResultEnum value : WsPushResultEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }


}
